sdk_append_inc(StdPeriphDriver/inc)
sdk_append_inc(RVMSIS)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/StdPeriphDriver/CH58x_clk.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/StdPeriphDriver/CH58x_flash.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/StdPeriphDriver/CH58x_gpio.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/StdPeriphDriver/CH58x_pwr.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/StdPeriphDriver/CH58x_sys.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/StdPeriphDriver/CH58x_timer0.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/StdPeriphDriver/CH58x_uart1.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/RVMSIS/core_riscv.S)
sdk_add_link_libraries(${CMAKE_CURRENT_SOURCE_DIR}/StdPeriphDriver/libISP583.a)

if(${DEMO_TYPE} STREQUAL "host")
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/rt-thread/bsp/usart)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/rt-thread/bsp)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/rt-thread/components/drivers/include)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/rt-thread/components/drivers/include/ipc)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/rt-thread/components/finsh)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/rt-thread/include)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/rt-thread/include/libc)
sdk_append_inc(${CMAKE_CURRENT_LIST_DIR}/rt-thread/libcpu/WCH/Qingke_V4A)

sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/bsp/usart/drv_usart.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/bsp/board.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/components/device/device.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/components/drivers/ipc/ringbuffer.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/components/finsh/*.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/libcpu/WCH/Qingke_V4A/context_gcc.S)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/libcpu/WCH/Qingke_V4A/cpuport.c)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/libcpu/WCH/Qingke_V4A/interrupt_gcc.S)
sdk_append_source(${CMAKE_CURRENT_LIST_DIR}/rt-thread/src/*.c)
endif()


